POV-Ray : Newsgroups : povray.general : an extraordinary rotation question : Re: an extraordinary rotation question Server Time
30 Jul 2024 14:30:08 EDT (-0400)
  Re: an extraordinary rotation question  
From: Christian Froeschlin
Date: 24 Jun 2009 18:42:38
Message: <4a42abde$1@news.povray.org>
Chris B wrote:

> The main advantage with using variables in this way is that you can 
> specify just the variables you need

Yes, I reckoned you used that mechanism for more convenient
default values. However, it's not quite true you only need to
specify the variables you need: you also need to reset those
which have been modified for some previous invocation of
the macro, and you may not always be aware of those.

That problem could be prevented by having two macros for
each object, the first one just resetting the defaults:

#macro Begin_Cabinet()
   #declare WIDTH = 0.6
   ...
#end

#macro End_Cabinet()
   union
   {
     ...
   }
#end

Begin_Cabinet()
#declare WIDTH = 0.7
End_Cabinet()

It would also remove the need for all those #ifndef's.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.